
package std.console

import std.io.InputStream
import std.sync.*
import std.io.OutputStream

@Deprecated[message: "Use related global functions in the std.env instead."]
@!APILevel[
    since: "22"
]
public class Console {
    @!APILevel[
        since: "22"
    ]
    public static prop stdIn: ConsoleReader
    
    @!APILevel[
        since: "22"
    ]
    public static prop stdOut: ConsoleWriter
    
    @!APILevel[
        since: "22"
    ]
    public static prop stdErr: ConsoleWriter
}

@Deprecated[message: "This class migrate to the std.env."]
@!APILevel[
    since: "22"
]
public class ConsoleReader <: InputStream {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    * @throws IllegalMemoryException
    * @throws IllegalSynchronizationStateException
    */
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func read(): ?Rune
    
    /**
    * @throws IllegalMemoryException
    * @throws IllegalSynchronizationStateException
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func readln(): ?String
    
    /**
    * @throws IllegalMemoryException
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func readToEnd(): ?String
    
    /**
    * @throws IllegalMemoryException
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func readUntil(ch: Rune): ?String
    
    /**
    * @throws IllegalMemoryException
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func readUntil(predicate: (Rune) -> Bool): ?String
    
    /**
    * @throws IllegalMemoryException
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func read(arr: Array<Byte>): Int64
}

@Deprecated[message: "This class migrate to the std.env."]
@!APILevel[
    since: "22"
]
public class ConsoleWriter <: OutputStream {
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func flush(): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func write(buffer: Array<Byte>): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func writeln(buffer: Array<Byte>): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func write(v: String): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func write<T>(v: T): Unit where T <: ToString
    
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func write(v: Bool): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func write(v: Int8): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func write(v: Int16): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func write(v: Int32): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func write(v: Int64): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func write(v: UInt8): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func write(v: UInt16): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func write(v: UInt32): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func write(v: UInt64): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func write(v: Float16): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func write(v: Float32): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func write(v: Float64): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func write(v: Rune): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func writeln(v: String): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func writeln<T>(v: T): Unit where T <: ToString
    
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func writeln(v: Bool): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func writeln(v: Int8): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func writeln(v: Int16): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func writeln(v: Int32): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func writeln(v: Int64): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func writeln(v: UInt8): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func writeln(v: UInt16): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func writeln(v: UInt32): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func writeln(v: UInt64): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func writeln(v: Float16): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func writeln(v: Float32): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func writeln(v: Float64): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func writeln(v: Rune): Unit
}

